Use the following to generate a table of contents...
```{toc} ```
Output:
You can automatically link back to any piece of text by using the bm inline tag: `{bm} SOME TEXT HERE`. For example, I can make all instances of the word metagenomics to reference back to this sentence.
Notice how in the markdown I write out `{bm} metagenomics` instead of the actual word. The text renders are plain text but anywhere else where the word metagenomics pops up, it automatically links to that bookmark. If you want to avoid having a specific instance link back, use `{bm-ri} metagenomics` instead of writing it out as plain text.
Generate notes by using the note block tag:
```{note}
This is a custom note.
```
Output:
TODO: Add CSS styling for this.
Set the title of the output document using the title inline/block tag:
```{title}
Markdown Example!
```
Output: (see the title of this HTML page)
If you're using a block tag, make sure you put the title on a NEW line (not on the same line that declares the tag).
Add a MathJax TeX expression using mj inline/block tag:
```{mj}
\frac{a}{b}
```
Inline output: $\frac{a}{b}$
Block output:
Add a KaTeX TeX expression using kt inline/block tag:
```{kt}
\frac{a}{b}
```
Inline output:
Block output:
Generate Graphviz dot diagrams by using dot block tag:
```{dot}
digraph {
a -> b;
b -> c;
b -> d;
}
```
Output:
Add a PlantUML diagram using the plantuml block tag:
```{plantuml}
@startuml
class Student {
Name
}
Student "0..*" - "1..*" Course
(Student, Course) .. Enrollment
class Enrollment {
drop()
cancel()
}
@enduml
```
Block output:
Add a table using the CSV block tag:
```{csv}
!!{ "firstLineHeader": true }
Code,Country
AFG,Afghanistan
ALB,Albania
ALG,Algeria
ASA,American Samoa
AND,Andorra
ANG,Angola
AIA,Anguilla
ATG,Antigua and Barbuda
```
Block output:
| Code | Country |
|---|---|
| AFG | Afghanistan |
| ALB | Albania |
| ALG | Algeria |
| ASA | American Samoa |
| AND | Andorra |
| ANG | Angola |
| AIA | Anguilla |
| ATG | Antigua and Barbuda |
Add a Gnuplot plot using the gnuplot block tag:
```{gnuplot}
set terminal svg size 300,300
a = 0.9
f(x) = a * sin(x)
g(x) = a * cos(x)
# Plot
plot f(x) title 'sin(x)' with lines linestyle 1, \
g(x) notitle with lines linestyle 2
```
Block output:
Normal CommonMark features are supported out of the box.
Block Code:
public static void main(String[] args) {
...;
}
Inline Code: code
Bold: bold text
Italic: italicized text
Blockquote:
blockquote blockquote blockquote
Ordered List:
Unordered List:
Horizontal Rule:
Link: Link to Google
Image: